package com.csd.action.news;

import com.csd.pojo.News;
import com.csd.service.INewsService;

/**
 * 
 * Action:查看消息详细
 * 
 * @author csd
 * @version 1.0
 * 
 * <br>
 *          修订时间：2009-12-17 <br>
 *          修改原因：创建文件 <br>
 *          修改人：何文深 <br>
 * 
 */
public class NewsDetailAction {

	private Integer newsID;
	
	private News newsDetail;
	
	private INewsService newsService;

	public Integer getNewsID() {
		return newsID;
	}

	public void setNewsID(Integer newsID) {
		this.newsID = newsID;
	}

	public News getNewsDetail() {
		return newsDetail;
	}

	public void setNewsDetail(News newsDetail) {
		this.newsDetail = newsDetail;
	}

	public INewsService getNewsService() {
		return newsService;
	}

	public void setNewsService(INewsService newsService) {
		this.newsService = newsService;
	}
	
	public String execute() throws Exception {
		String text = "fail";
		newsDetail = newsService.searchNews(newsID);
		if (newsDetail != null) {
			text = "success";
		}
		return text;
	}
}
